{extend name="member/common/shop_layout" /}
{block name="content"}

<div class="ncm-flow-layout">
  <div class="ncm-flow-container">
    <div class="title">
      <h3>退货退款服务</h3>
    </div>
    <div class="alert">
      <h4>提示：</h4>
      <ul>
        <!--<li>1. 若提出申请后，商家拒绝退款或退货，可再次提交申请或选择<em>“商品投诉”</em>，请求商城客服人员介入。</li>-->
        <!--<li>2. 成功完成退款/退货；经过商城审核后，会将退款金额以<em>“预存款”</em>的形式返还到您的余额账户中（充值卡部分只能退回到充值卡余额）。</li>-->
      </ul>
    </div>
    <div id="saleRefundReturn" show_id="1">
      <div class="ncm-flow-step">
        <dl class="step-first current">
          <dt>买家申请退货</dt>
          <dd class="bg"></dd>
        </dl>
        <dl class="<?php echo $return['seller_time'] > 0 ? 'current':'';?>">
          <dt>商家处理退货申请</dt>
          <dd class="bg"> </dd>
        </dl>
        <dl class="<?php echo ($return['ship_time'] > 0 || $return['return_type']==1) ? 'current':'';?>">
          <dt>买家退货给商家</dt>
          <dd class="bg"> </dd>
        </dl>
        <dl class="<?php echo $return['admin_time'] > 0 ? 'current':'';?>">
          <dt>确认收货，平台审核</dt>
          <dd class="bg"> </dd>
        </dl>
      </div>
      <div class="ncm-default-form">
        <h3>我的退货退款申请</h3>
        <dl>
          <dt>退货退款编号：</dt>
          <dd><?php echo $return['refund_sn']; ?> </dd>
        </dl>
        <dl>
          <dt>退货退款原因：</dt>
          <dd><?php echo $return['reason_info']; ?> </dd>
        </dl>
        <dl>
          <dt>退款金额：</dt>
          <dd>&yen;<?php echo $return['refund_amount']; ?> </dd>
        </dl>
        <dl>
          <dt>退货数量：</dt>
          <dd><?php echo $return['return_type']==2 ? $return['goods_num']:'无'; ?></dd>
        </dl>
        <dl>
          <dt>退货退款说明：</dt>
          <dd><?php echo $return['buyer_message']; ?> </dd>
        </dl>
        <dl>
          <dt>凭证上传：</dt>
          <dd>
            <?php if (is_array($pic_list) && !empty($pic_list)) { ?>
            <ul class="ncm-evidence-pic">
              <?php foreach ($pic_list as $key => $val) { ?>
              <?php if(!empty($val)){ ?>
              <li><a href="<?php echo UPLOAD_SITE_URL.'/'.ATTACH_PATH.'/refund/'.$val;?>"  nctype="nyroModal"> <img class="show_image" src="<?php echo UPLOAD_SITE_URL.'/'.ATTACH_PATH.'/refund/'.$val;?>"></a></li>
              <?php } ?>
              <?php } ?>
            </ul>
            <?php } ?>
          </dd>
        </dl>
        <h3>商家退货退款处理</h3>
        <dl>
          <dt>审核状态：</dt>
          <dd><?php echo $state_array[$return['seller_state']]; ?>
            <?php if ($return['seller_state'] == 2 && $return['return_type'] == 1) { ?>
            （商家弃货，即不用将商品退回直接退款。）
            <?php } ?>
            </dd>
        </dl>
        <?php if ($return['seller_time'] > 0) { ?>
        <dl>
          <dt>商家备注：</dt>
          <dd><?php echo $return['seller_message']; ?> </dd>
        </dl>
        <?php } ?>
        <?php if($return['seller_state'] == 2 && $return['return_type'] == 2 && $return['goods_state'] == 1 && $ship == 1) { ?>
        
        {include file="member/returns/_return_ship" /}
        
        <?php } else { ?>
        <?php if ($return['express_id'] > 0 && !empty($return['invoice_no'])) { ?>
        <h3>我的退货发货信息</h3>
        <dl>
          <dt>物流信息：</dt>
          <dd> <?php echo $return_e_name.' , '.$return['invoice_no']; ?> </dd>
        </dl>
        <?php } ?>
        <?php if ($return['seller_state'] == 2 && $return['refund_state'] >= 2) { ?>
        <h3>商城退款审核</h3>
        <dl>
          <dt>平台确认：</dt>
          <dd><?php echo $admin_array[$return['refund_state']]; ?> </dd>
        </dl>
        <?php } ?>
        <?php if ($return['admin_time'] > 0) { ?>
        <dl>
          <dt>平台备注：</dt>
          <dd><?php echo $return['admin_message']; ?> </dd>
        </dl>
        <?php if ($detail_array['refund_state'] == 2) { ?>
        <h3>退款详细</h3>
        <dl>
          <dt>支付方式：</dt>
          <dd><?php echo orderPaymentName($detail_array['refund_code']);?></dd>
        </dl>
        <dl>
          <dt>在线退款金额：</dt>
          <dd><?php echo ncPriceFormat($detail_array['pay_amount']); ?> </dd>
        </dl>
        <dl>
          <dt>预存款金额：</dt>
          <dd><?php echo ncPriceFormat($detail_array['pd_amount']); ?> </dd>
        </dl>
        <dl>
          <dt>充值卡金额：</dt>
          <dd><?php echo ncPriceFormat($detail_array['rcb_amount']); ?> </dd>
        </dl>
        <?php } ?>
        <?php } ?>

          <div class="bottom">
            <a style=" color: #FFF;background-color: #333333;" href="{:url('member/Mallconsult/add_mallconsult')}" class="ncbtn"><i class="icon"></i>平台客服</a>
            <a href="javascript:history.go(-1);" class="ncbtn"><i class="icon-reply"></i>返回列表</a>
          </div>
        <?php } ?>
      </div>
    </div>
  </div>

  {include file="member/refund/_refund_right" /}

</div>
<script src="__SITE_RESOURCE__/js/jquery.nyroModal/custom.min.js" ></script>
<link href="__SITE_RESOURCE__/js/jquery.nyroModal/styles/nyroModal.css" rel="stylesheet" type="text/css" id="cssfile2" />
<script>
$(document).ready(function(){
   $('a[nctype="nyroModal"]').nyroModal();
});
</script>

{/block}